package com.demo.api.vo.dict;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.demo.core.annotation.NotBlank;
import com.demo.core.annotation.TableFieldDefaultValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotNull;
import java.util.Date;

public class DictReq {
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Query {
        private String name;
        private Long parentId;
        private String code;
        private String parentCode;
        private Integer status;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Create {

        @ApiModelProperty("父级id")
        private Long parentId;

        @NotBlank(message = "字典名称不能为空")
        @ApiModelProperty("名称")
        private String name;

        @ApiModelProperty("1启用")
        private Integer status;

        @ApiModelProperty("序号")
        private Integer sort;

        @ApiModelProperty("备注")
        private String remark;

        @ApiModelProperty("字典code")
        private String code;

        @ApiModelProperty("上级code")
        private String parentCode;
    }

    @EqualsAndHashCode(callSuper = true)
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Update extends Create {

        @ApiModelProperty("id")
        @NotNull(message = "id不能为空")
        private Long id;



    }
}
